package me.zhengjie.face.demo;

import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class ReadImage {


    public static void main(String args[]) {
        String filePath = "D:\\image.txt";
        StringBuffer stringBuffer = new StringBuffer();
        try {
            BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(filePath),"UTF-8"));
            String line;
            while ((line = br.readLine()) != null) {
                if (StringUtils.isNoneBlank(line)) {
                    stringBuffer.append(line);
                }
            }
            br.close();
        } catch (Exception e) {
            System.out.println("读取文件内容出错");
            e.printStackTrace();
        }
        System.out.println(stringBuffer.toString());
    }
}
